<?php
/**
* 收益模块后台 Controller
*
* 收益模块后台 Controller的注意及说明
* 以下use模块请不要互相伤害
*
* @author    xiecz <xiecz@yunys.com.cn>
* @copyright 2016 QuanZhouYunYiShang Inc.
*/

namespace App\Http\Controllers\Backstage;

use Illuminate\Routing\Controller as BaseController;
use Response, Request;
use App\Services\Statistics\IncomeBackstage;

class IncomeController extends BaseController{

    function __construct(IncomeBackstage $incomeBackstage){
        $this->incomeBackstage = $incomeBackstage;
    }

    /**
     * 申请提现列表
     * @return $this
     */
    function applyWithdrawList(){
        $input  = Request::all();
        $result = $this->incomeBackstage->apply_withdraw_list($input);
        return view('backstage.statistics.user-apply-withdraw-list')->with('result',$result);
    }

    /**
     * 提现申请详情
     * @return $this
     */
    function userApplyWithdraw(){
        $input  = Request::all();
        $result = $this->incomeBackstage->user_apply_withdraw($input);
        return view('backstage.statistics.user-apply-withdraw')->with('result',$result);
    }

    /**
     * 提现转账
     * @return mixed
     */
    function transferAccounts(){
        $input  = Request::all();
        $result = $this->incomeBackstage->transfer_accounts($input);
        return response()->json($result);
    }

    //取消提现
    function cancel(){
        $input  = Request::all();
        $result = $this->incomeBackstage->cancel($input);
        return response()->json($result);
    }
}
